<%@ page
	import="merlin.beans.*,merlin.dao.*,merlin.managers.*,merlin.servlets.*,merlin.utils.*"
	contentType="text/html;charset=windows-1252"
%>

<%
	// remove any pre-existing session for this user.
	if(session.getAttribute("username") != null){
		session.invalidate();
	}
%>

<html>
  <head>
	<meta HTTP-EQUIV="Cache-Control"  CONTENT="no-cache" />
	<meta HTTP-EQUIV="Expires"        CONTENT="1 Jan 1980" />
	<meta HTTP-EQUIV="MaxAge"         CONTENT="0" />
	<meta HTTP-EQUIV="Pragma-Control" CONTENT="no-cache" />

    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Merlin Scott Free Updates</title>
    <script>
		function isBlank(str){
			var len = str.length;
			if(len==0)return true;	// zero-length string
			for(i=0;i<len;i++){
				if(str.charAt(i) !=' ' && str.charAt(i) !='\n')return false; //some character is there
			}
			return true;
		}

		function submitFormForSearch(frm){
			// sanity check
			if(isBlank(frm.txtSearch.value)){
				alert("Enter search text");
				frm.txtSearch.focus();
				return false;
			}
			return true;
    	}

		/*
		 If the user has entered some email id, check against the database in case the user
		 is already registered.
		*/
		function registerUser(){
			if(isBlank(document.loginForm.txtEmailAddress.value)){
				// go to registration page
				document.location='mr_customerRegistration.jsp';
			}else{
				// check for existance of the login id.
				document.loginForm.mode.value= "checkForLoginExistance";
				document.loginForm.submit();
			}
		}
    </script>

	<link href="css/master.css" rel="stylesheet" type="text/css">

  </head>


<body onload="document.loginForm.txtEmailAddress.focus()">

	<jsp:include page = "mr_header2.jsp"/>

<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">

      <tr>
        <td width="180">
					<div class="sidenav">
		<div id="LCindustry">
			<h5>Industry Search</h5>
		</div>
						<!-- #BeginLibraryItem "/Library/sidenav.lbi" -->
	 	<form action="merlin" name="frmSearch" method="post" onsubmit="return submitFormForSearch(this)">
	 		<input type="hidden" name="mode" value="searchReportsByReportDesc">
	 		<input type="hidden" name="pageName" value="mr_searchReports.jsp">
	 		<input type="text" name="txtSearch" class="search"/><input type="image" src="../MSAL/new-images/search-go.jpg" alt="Search" width="30" height="20" title="Search">
    	</form>
						<div class="sidenav">
							<div id="LCexisting">
								<h5>Existing Customers</h5>
							</div>
							<ul>
								<li><a href="mr_loginFreeUpdates.jsp">Request a FREE Update to Your Report </a>
							</ul>
							<div id="LCnew">
								<h5>New to the Site?</h5>
							</div>
							<ul>
								<li><a href="mr_searchReports.jsp">Order a Report</a>
								<li><a href="enquiries.jsp">View a list of all available report titles</a>
								<li><a href="book.jsp">Book Demo</a>
								<li><a href="database.jsp">Searchable Database Demo</a>
								<li><a href="samplelayouts/samplecompanyb.jsp">Sample Company</a>
								<li><a href="samplelayouts/SampleAnalysis.jsp">Our Analysis</a>
							</ul>
						</div>
						<!-- #EndLibraryItem --><!-- END #sidenav --></div>

</td>
        <td width="20"><img src="spacer.gif" width="20" height="1"></td>
        <td width="550">
		<!-- BEGIN #rightColumn -->
	<div class="content-main">

	<div class="rightColumn">
		<div id="orangeBar">
	<h5 class="welcome">Free Updates</h5>
		</div>
		<div><table width="300" cellpadding="0" cellspacing="0">
 <tr>
  <td>


	<div style="height:.5cm;">
	</div>
	<div align='center' style="height:15px;">
	<%
		String err = (String)request.getAttribute("error.login");
		if(err != null){
			out.println("<span align='center' STYLE='FONT: 11px verdana,arial,sans-serif;color:red;font-weight:bold'>" + err + "</span>");
		}
		String msg = (String)request.getAttribute("message");
		if(msg != null){
			out.println("<span align='center' STYLE='FONT: 11px verdana,arial,sans-serif;color:GREEN;;font-weight:bold'>" + msg + "</span>");
		}
	%>
	</div>
	<p>
	</p>
	<form name="loginForm" method="post" action="merlin">

		<input type="hidden" name="mode" value="loginForFreeUpdates">

		<table align="center" width="100%" border="0"> <!-- style="background-color:rgb(146,207,100);font-family:tahoma;" -->
			<tr>
				<td colspan="2" align="center" style='color:white;height:30px;font: 11px verdana,arial, sans-serif ;background:url("mr_images/Long-Bar-green.jpg");background-repeat:no-repeat' >
					<h4>Merlin Scott Free Updates</h4>
				</td>
			</tr>
			<tr>
				<td width="30%" style='font:11px verdana,arial,sans-serif;'>
					 &nbsp;Email
				</td>
				<td width="70%">
					<input type="text" name="txtEmailAddress" style="text-transform:lowercase;font:11px verdana,arial,sans-serif;"value= '<%= request.getParameter("txtUserName")!=null ? request.getParameter("txtUserName") : "" %>' >
				</td>
			</tr>
			<tr>
				<td>
				</td>
				<td colspan="1" align="right">
					<input type="button" name="btnRegister" value="Register" onclick ="registerUser()" style="margin-right:20px;font: 11px verdana,arial, sans-serif ;">
					<input type="SUBMIT" name="btnLogin" value="Log On" style="margin-right:20px;font: 11px verdana,arial, sans-serif ;">
				</td>
			</tr>
		</table>
	</form>
	</td>
   </tr>
</table></div></div></div>
</table>

	<div style="height:1.0cm;">
	</div>
	<jsp:include page="mr_footer.jsp"/>

	<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=928985;
var sc_invisible=1;
var sc_partition=7;
var sc_security="206963a7";
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/frames.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img  src="http://c8.statcounter.com/counter.php?sc_project=928985&amp;amp;java=0&amp;amp;security=206963a7&amp;amp;invisible=1" alt="hidden hit counter" border="0"></a> </noscript>
<!-- End of StatCounter Code -->

  </body>
</html>